unify javascript content delivery networks; update frontend libraries to latest versions #59
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
currently there are 4 CDNs that are being called for different javascript libraries. this means that there are 4 different third-party requests being made on each load.
why do it?
the advantage of unifying all of the libraries from a single provider is that all of the requests can be served off a single connection if the connection is made over HTTP/2 essentially making the load times at least 2 times faster.
why jsDelivr?
jsDelivr has a wide network spanning multiple caching network providers whereas the other providers rely on a single caching network ( unpkg, cdnjs - cloudflare, github - fastly ). while technically all the requests could probably be served from the same backend cache, since the requests are being proxied via different domains, naturally, they have to go through different connections. if all the requests are proxied through the same
domain and via HTTP/2, the requests can all be served via the same connection making the page load faster.
other changes
- synced the library version forace/ext-language_tools
with the loadedace.js
library`ace
andreact
to latest versionsfor-offline
scripts/build/build-offline-dev.sh
( tested on ubuntu 20.04 LTS and debian 10 buster ).### room for improvement-react
andbabel-polyfill
libraries could be upgraded to the latest major versions. since I wasn't sure whether this would cause any breakage in the application, I didn't attempt an upgrade. I just used the already existing version but just changed the provider URL. Maybe a minor version upgrade ( react ) would do much harm? ( I didn't want to take the risk since it was react )I could however attempt to upgrade to the latest versions if given approval. I just don't know the application well enough to know where to look for breakages.related : tddbin/katas#105